package com.letv.app.ljodfh.ui.adapter.holder;

import android.content.Context;
import android.view.View;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.letv.app.ljodfh.R;
import com.letv.app.ljodfh.ui.util.IListShowData;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by rh008 on 2017/7/13.
 */

public class OnlyTitleHolder extends BaseAbsHolder<IListShowData> {

    @BindView(R.id.item_only_title_title)
    protected CustomFontTextView title;
    /**
     * 是否需要加粗
     */
    protected boolean shouldBold;

    public OnlyTitleHolder(Context context, View itemView) {
        super(context, itemView);
    }

    public OnlyTitleHolder(Context context, View itemView, boolean shouldBold) {
        super(context, itemView);
        setShouldBold(shouldBold);
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(IListShowData iListShowData) {
        title.setText(iListShowData.getDataTitle());
    }

    public void setShouldBold(boolean shouldBold) {
        this.shouldBold = shouldBold;
        title.getPaint().setFakeBoldText(shouldBold);
    }
}
